<?php
namespace app\adminjcb\controller;

use app\common\controller\AdminBaseController;

/**
 * Class Article
 */
class AlipayController extends AdminBaseController {

	/**
	 * 更新文章
	 * @param $id
	 */
	public function thumb() {
		if ($this->request->isPost()) {
			if (input('thumb_img')) {
				$data['value'] = input('thumb_img');
			}
			if (db('system')->where('name', 'alipay_thumb')->update($data) !== false) {
				$this->success('保存成功');
			} else {
				$this->error('保存失败');
			}
		} else {
			$model = db('system')->where('name', 'alipay_thumb')->find();
			$this->assign('model', $model);
			return $this->fetch();
		}
	}

}
